#!/bin/bash

params__corpus=( S3 S4 S11 S12 S13 S14 S15 S16 S17 S18 )
params__block_length=5 #in seconds
params__smooth_window=23 #in frames
params__C_MS=0.3
params__C_FA=0.7

#Input/Output folders
params__database_folder='/home/anna/Hospital/Databases/1_SCDB'
params__reference_folder='/home/anna/Hospital/Segmentation/Alarms_detection/RBMLIB/test/'

for params__test_session in ${params__corpus[@]}; do
    experiment_name="Ch18_C18_fbank_out_30-10_24000_ss_mcra_ad098_as06_ap015_test${params__test_session}_balanced_MVN/labels_S2"
    params__gmm_output_folder="/home/anna/Hospital/Segmentation/Alarms_detection/RBMLIB/test/30-10_tuned/SW${params__smooth_window}/${experiment_name}/"
    params__result_folder="${params__gmm_output_folder}/${params__test_session}"

    #params__p=-10

    #python Smooth_decision_correct.py ${params__result_folder} ${params__p} ${params__smooth_window}
    #python Merge_recognizer_labels.py ${params__result_folder} ${params__p}

    # Use one only one of these two. Last one includes last interval stats.
    #python Get_evaluation_interval_stats.py ${params__block_length}
    python Get_evaluation_interval_stats_last.py ${params__block_length} ${params__database_folder} ${params__reference_folder}

    #python Create_labels.py ${params__block_length}

    # Use one only one of these two. Last one includes last interval stats.
    #python Create_gmmoutput_labels.py ${params__block_length} ${params__experiment_name}
    python Create_gmmoutput_labels_last.py ${params__block_length} ${params__gmm_output_folder} ${params__test_session}

    python Compare_labels.py ${params__block_length} ${params__gmm_output_folder} ${params__reference_folder} ${params__test_session} ${params__C_MS} ${params__C_FA}
done
